Optimal. Leaf size=89 \[ \frac {3 b x}{8}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a \cos (c+d x)}{d}+\frac {a \cos ^3(c+d x)}{3 d}+\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2917, 2672,
308, 212, 2715, 8} \begin {gather*} \frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos (c+d x)}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {b \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 b \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 b x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 212
Rule 308
Rule 2672
Rule 2715
Rule 2917
Rubi steps
\begin {align*} \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x)) \, dx &=a \int \cos ^3(c+d x) \cot (c+d x) \, dx+b \int \cos ^4(c+d x) \, dx\\ &=\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (3 b) \int \cos ^2(c+d x) \, dx-\frac {a \text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{8} (3 b) \int 1 \, dx-\frac {a \text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {3 b x}{8}+\frac {a \cos (c+d x)}{d}+\frac {a \cos ^3(c+d x)}{3 d}+\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {3 b x}{8}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a \cos (c+d x)}{d}+\frac {a \cos ^3(c+d x)}{3 d}+\frac {3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 109, normalized size = 1.22 \begin {gather*} \frac {3 b (c+d x)}{8 d}+\frac {5 a \cos (c+d x)}{4 d}+\frac {a \cos (3 (c+d x))}{12 d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {b \sin (2 (c+d x))}{4 d}+\frac {b \sin (4 (c+d x))}{32 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 76, normalized size = 0.85
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(76\) |
default | \(\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(76\) |
risch | \(\frac {3 b x}{8}+\frac {5 a \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {5 a \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {b \sin \left (4 d x +4 c \right )}{32 d}+\frac {a \cos \left (3 d x +3 c \right )}{12 d}+\frac {b \sin \left (2 d x +2 c \right )}{4 d}\) | \(116\) |
norman | \(\frac {\frac {3 b x}{8}+\frac {8 a}{3 d}+\frac {5 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {3 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {5 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {9 b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {3 b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 b x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {20 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(221\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 81, normalized size = 0.91 \begin {gather*} \frac {16 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a + 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} b}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 88, normalized size = 0.99 \begin {gather*} \frac {8 \, a \cos \left (d x + c\right )^{3} + 9 \, b d x + 24 \, a \cos \left (d x + c\right ) - 12 \, a \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 12 \, a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (2 \, b \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right ) \cos ^{4}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 145, normalized size = 1.63 \begin {gather*} \frac {9 \, {\left (d x + c\right )} b + 24 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (15 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 48 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 96 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 32 \, a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.82, size = 242, normalized size = 2.72 \begin {gather*} \frac {3\,b\,\mathrm {atan}\left (\frac {9\,b^2}{16\,\left (\frac {3\,a\,b}{2}-\frac {9\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}+\frac {3\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {3\,a\,b}{2}-\frac {9\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}\right )}{4\,d}+\frac {-\frac {5\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+8\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {20\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {5\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {8\,a}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________